<template>
</template>

<script setup>
	import {
		wxLogin
	} from '@/api/login.js'
	import {
		ref,
		onMounted
	} from 'vue';


	async function WxLogin() {
		var res = await wxLogin();
		if(res){
			uni.switchTab({
				url: '/pages/index/index'
			});
		}else{
			WxLogin();
		}
	}

	onMounted(() => {
		WxLogin();
	});
</script>


<style lang="scss" scoped>
</style>